package com.aqiang.day0528_shop.user.model

import com.aqiang.day0528_shop.user.api.UserApi
import com.aqiang.day0528_shop.user.contract.UserContract
import com.aqiang.day0528_shop.user.entity.UserEntity
import com.aqiang.lib_core.net.RetrofitManage
import com.zy.shopproject2.usercenter.entity.BaseResponseEntity
import kotlinx.coroutines.Deferred

class RegisterModel : UserContract.RegisterModel {
    override fun register(user: String, pwd: String): Deferred<BaseResponseEntity> {
        return RetrofitManage.create(UserApi::class.java).register(UserEntity("",0,pwd,"",user))
    }

    override fun auth(): Deferred<Int> {
        return RetrofitManage.create(UserApi::class.java).auth()
    }
}